package com.ddf.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.ddf.interceptor.RequestContext;

@Controller
@RequestMapping("/testRequestContext")
public class TestRequestContext {
	private Logger log = LoggerFactory.getLogger(this.getClass());
	@Autowired
	private RequestContext requestContext;
	
	@RequestMapping("/testParams")
	public String testParams() {
		log.info("-----------RequestContext------------------");
		log.info(requestContext.values() + "");
		log.info("username: " + requestContext.get("username"));
		log.info("-----------RequestContext------------------");
		return "success";
	}
}
